var AuthInterceptor = function ($q, $injector, $rootScope, $cookies) {
    return {
        request: function (config) {
            config.headers = config.headers || {};
            var token = $cookies.get('token') || $cookies.get('sessionId') || sessionStorage.getItem('sessionId');
            if (token) {
                // config.headers.authorization = 'Bearer ' + $cookies.get('token');
                config.headers.session_id = token;
            }
            return config;
        }
    };
}
AuthInterceptor.$inject=["$q","$injector","$rootScope","$cookies"];
export default AuthInterceptor;